package com.meevle.web;

import java.util.Map;

public interface INavigationFactory {

	/**
	 * Get a navigation in HTML that you can plug in to the site
	 * @param servlet The servlet object. The name of the servlet MUST be equal to the key in the pagesMap you provided
	 *  to the implementation of this Interface.
	 *    
	 *  E.G.: If the name of the Servlet is Index, then you must have an Entry like this in the pages map Entry<Index, Home>
	 * @return For example <ul><li><a href="Index.do"/>Home<li></ul>
	 */
	String getNavigation(Object servlet);
	
	/**
	 * Present a <code>Map</code> to the INavigationFactory implementation and do it like this:
	 * the Map has keys and values.
	 * <ul>
	 * 	<li>The keys must contain the classnames of your servlets. E.g. you have a servlet Index.java, then a key must be Index</li>
	 *  <li>The values must contain the value you want it to have in your navigation. E.g. if you want to have 'Home' in your navigation, then the value must be Home</li>
	 * </ul>
	 * 
	 *  An example? The following is an examle <code>Entry</code> of the pagesmap: ("Index", "Home"). This means the name of your servlet is <code>Index.java</code> and you want to 
	 *  to display the link to this servlet as 'Home'.
	 * @param pages
	 */
	void setPages(Map<Object, Object> pages);
	
	/**
	 * The suffix of your servlets as they're referenced to by the web.xml. E.g. <code>".do"</code> which means ALL your servlets have the suffix .do
	 * @param suffix
	 */
	void setServletSuffix(String suffix);
	
	/**
	 * The name of the CSSclass that's used in your stylesheet to style the current page in the navigation; EG: current
	 * @param cssClassnameCurrentPage
	 */
	public void setCssClassnameCurrentPage(String cssClassnameCurrentPage);
}
